View Javadoc
1 /* 2 * ReadUncommitedCache.java 3 * 4 * $Id: ReadUncommitedCache.java,v 1.4 2004/03/07 14:33:56 baliuka Exp $ 5 */ 6 7 package net.sf.voruta; 8 9 /*** 10 * 11 * @author baliuka 12 */ 13 class ReadUncommitedCache implements Cache{ 14 15 protected static Object NULL = new Object(); 16 17 private int hit; 18 19 private int miss; 20 21 protected SoftRefMemoryCache global = new SoftRefMemoryCache(); 22 23 24 public void afterCommit() { 25 } 26 27 public void afterRollback() { 28 } 29 30 public void beforeBegin() { 31 } 32 33 34 public void clear() { 35 synchronized(global){ 36 global.clear(); 37 } 38 } 39 40 public Object get(Object key) { 41 synchronized(global){ 42 return global.get(key); 43 } 44 } 45 46 public void put(Object key, Object value) { 47 synchronized(global){ 48 global.put(key, value); 49 } 50 } 51 52 53 public int hit(){ 54 return hit; 55 } 56 57 public int miss(){ 58 return miss; 59 } 60 61 }

This page was automatically generated by Maven